package com.example.device.admin.service.impl;


import com.example.device.admin.dao.entity.po.DeviceInfo;

import com.example.device.admin.dao.mapper.DeviceInfoMapper;
import com.example.device.admin.service.DeviceInfoService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;

@Service
public class DeviceInfoServiceImpl implements DeviceInfoService {
    @Autowired
    private DeviceInfoMapper deviceInfoMapper;
    @Override
    public boolean updateStatus(String deviceName, String status) {

        DeviceInfo deviceInfo=new DeviceInfo();
        deviceInfo.setName(new String());
        deviceInfo.setTime(new Date());
        deviceInfo.setValue(new String());
        int i = deviceInfoMapper.insertOrUpdateStatus(deviceInfo);
        if(i!=1){
            return false;
        }else {
            return true;
        }
    }



}
